
export default function checkToken(options) {
    return new Promise((resolve, reject) => {
        if(options.noNeedToken){
            resolve()
            return
        }
        //用户
        const member = wx.getStorageSync('member')
        //token
        const token = wx.getStorageSync('token')
        var openId = getApp().globalData.openId
        if(member && token && openId){
            resolve()
            return
        }
        if(!member || !token){
            getApp().login().then((res)=>{
                resolve()
                return
            })
        }
    })
}
